<div class="box660">
	<div class="msg"></div>
	<h3 class="detail_title">
		<?=$album['title']?>
		<div class="bdsharebuttonbox" data-tag="share_1">
			<a class="bds_weixin" data-cmd="weixin"></a>
			<a class="bds_tsina" data-cmd="tsina"></a>
			<a class="bds_qzone" data-cmd="qzone" href="#"></a>
			<a class="bds_baidu" data-cmd="baidu"></a>
			<a class="bds_renren" data-cmd="renren"></a>
			<a class="bds_tqq" data-cmd="tqq"></a>
			<a class="bds_more" data-cmd="more"></a>
		</div>	

	</h3>
	<div class="otherInfo">
		<span class="time icon"><?=date('Y-m-d', strtotime($album['ctime']))?></span>
		<span class="total icon"><?=$album['total']?></span>
		<span class="hits icon"><?=$album['hits']?></span>
	</div>
	
	<ul class="images">
		<?php foreach($lists as $v) { ?>
		<li class="li">
		<?php if(get_cookie('uid')) { ?>
			<a href="<?=site_url('detail/setCover?aid='.$album['id'].'&id='.$v['id'])?>" class="setCover">设为封面</a>
		<?php } ?>
			<img src="<?=get_thumb($v['local_url'], false).'-water'?>" alt="<?=$album['title']?>" title="<?=$album['title']?>"/>
		</li>
		<?php } ?>
		<li class="ge"></li>
		<?php foreach($jian as $k=>$v) { ?>
		<li class="jian <?=$k<4 ? 'line' : ''?>">
			<a href="<?=site_url('detail?aid='.$v['id'])?>"><img src="<?=get_thumb($v['cover'].'?imageView2/1/w/180/h/180', false)?>" alt="<?=$v['title']?>" title="<?=$v['title']?>"/></a>			
		</li>
		<?php } ?>
	</ul>

	<div class="jian">
	<?php foreach($jian as $v) { ?>
		<a href="">
			<img src="" alt="" title=""/>
		</a>
	<?php } ?>
	</div>

	<h2 class="msgtitle">流言蜚语</h2>
	<form action="<?=site_url('detail/sendMsg')?>" method="post" class="msgform">
		<input type="hidden" name="aid" value="<?=$album['id']?>"/>
		<textarea name="content"></textarea>
		<input type="submit" value="流 言" class="submit" />
	</form>
	<ul class="msgList">
	<?php foreach($msgs as $v) { ?>
		<li>
			<div><span class="time"><?=date('m-d H:i', strtotime($v['ctime']))?></span></div>
			<div class="content"><?=t2h(strip_tags($v['content']))?></div>
		</li>
	<?php } ?>
	</ul>
</div>
<script>
	window._bd_share_config = {
		common : {
			bdText : "<?=$album['title']?>",	
			bdDesc : "<?=$album['title']?>",	
			bdUrl : "<?=site_url('detail?aid='.$album['id'])?>", 	
			bdPic : "<?=get_thumb($album['cover'])?>"
		},
		share : [{
			"bdSize" : 16
		}]
	}
	with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
</script>
<script type="text/javascript">
	$(function() {
		$('.setCover').click(function() {
			$.get($(this).attr('href'), {}, function(data) {
				if(data) {
					$('.msg').html('设置成功！').show().delay(2000).fadeOut();
				} else {
					$('.msg').html('设置失败！').show().delay(2000).fadeOut();
				}
			});
			return false;
		});

		$('.submit').click(function() {
			if($('.msgform textarea').val() == '' || $('.msgform textarea').val().length < 5) {
				alert('不够分量啊');
				return false;
			}
			$.post($('.msgform').attr('action'), $('.msgform').serialize(), function(data) {
				if(data) {
					$(".msgList").prepend(data);
					$('.msgform textarea').val('');
				} else {
					alert('出错了');
				}
			});
			return false;
		});
	});
</script>